Optimal. Leaf size=29 \[ -\frac{a \cot (c+d x)}{d}-a x+\frac{b \log (\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0397291, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3529, 3531, 3475} \[ -\frac{a \cot (c+d x)}{d}-a x+\frac{b \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3529
Rule 3531
Rule 3475
Rubi steps
\begin{align*} \int \cot ^2(c+d x) (a+b \tan (c+d x)) \, dx &=-\frac{a \cot (c+d x)}{d}+\int \cot (c+d x) (b-a \tan (c+d x)) \, dx\\ &=-a x-\frac{a \cot (c+d x)}{d}+b \int \cot (c+d x) \, dx\\ &=-a x-\frac{a \cot (c+d x)}{d}+\frac{b \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [C] time = 0.115011, size = 51, normalized size = 1.76 \[ \frac{b (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d}-\frac{a \cot (c+d x) \, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};-\tan ^2(c+d x)\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.029, size = 37, normalized size = 1.3 \begin{align*} -ax+{\frac{b\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-{\frac{\cot \left ( dx+c \right ) a}{d}}-{\frac{ac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.65016, size = 65, normalized size = 2.24 \begin{align*} -\frac{2 \,{\left (d x + c\right )} a + b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 2 \, b \log \left (\tan \left (d x + c\right )\right ) + \frac{2 \, a}{\tan \left (d x + c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.68379, size = 149, normalized size = 5.14 \begin{align*} -\frac{2 \, a d x \tan \left (d x + c\right ) - b \log \left (\frac{\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right ) + 2 \, a}{2 \, d \tan \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.01651, size = 70, normalized size = 2.41 \begin{align*} \begin{cases} \tilde{\infty } a x & \text{for}\: \left (c = 0 \vee c = - d x\right ) \wedge \left (c = - d x \vee d = 0\right ) \\x \left (a + b \tan{\left (c \right )}\right ) \cot ^{2}{\left (c \right )} & \text{for}\: d = 0 \\- a x - \frac{a}{d \tan{\left (c + d x \right )}} - \frac{b \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{b \log{\left (\tan{\left (c + d x \right )} \right )}}{d} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.29164, size = 112, normalized size = 3.86 \begin{align*} -\frac{2 \,{\left (d x + c\right )} a + 2 \, b \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right ) - 2 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{2 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]